# &#xf05a;&#xeba2;&#xe83d;&#xe583;

# pip install fonttools

# from fontTools.ttLib import TTFont
# font = TTFont("./2a70c44b.woff")
# font.saveXML("font.xml")

import re
with open("font.xml", "r") as f:
	content = f.read()
	item = {}
	glyphs = re.findall(r'<GlyphID id="(.*?)" name="(.*?)"/>', content)[2:]
	for glyph in glyphs:
		item[glyph[1]] = int(glyph[0]) - 2
	# print(len(item))

	result = {}
	maps = re.findall(r'<map code="0(.*?)" name="(.*?)"/>', content)
	# print(maps)
	for map in maps:
		if map[1] in item:
			result[f"&#{map[0]}"] = item[map[1]]

	print(result)
